package com.dnjn.happiness.survey.domain.vo;

import com.dnjn.happiness.common.core.web.domain.BaseEntity;
import com.dnjn.happiness.survey.domain.Tiku;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.util.List;

/**
 * 创建问卷模板对象 svy_survey_template
 *
 * @author happiness
 * @date 2023-11-20
 */
@Accessors(chain = true)
@Getter
@Setter
public class SurveyTemplateVO extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * PK
     */
    @JsonSerialize(using = ToStringSerializer.class)
    private Long surveyId;


    /**
     * 问卷类型 COMMON-普通, COMMUNICATE-沟通
     */
    @Schema(description = "问卷类型")
    private String surveyType;

    /**
     * 发起人id
     */
    @Schema(description = "发起人id")
    private Long initiatorId;

    /**
     * 问卷标题
     */
    @Schema(description = "问卷标题")
    @NotBlank(message = "问卷主题不能为空")
    private String surveyTitle;

    /**
     * 问卷描述
     */
    @Schema(description = "问卷描述")
    private String surveyDescription;


    /**
     * READY-创建中 PROCESSING-已下发 FINISHED-已结束（到结束时间后）
     */
    @Schema(description = " READY-创建中 PROCESSING-已下发 FINISHED-已结束,选择创建问卷需要前端将 surveyStatus设置为READY,小程序选择下发问卷需设置为PROCESSING")
    private String surveyStatus;

    /**
     * 题库模块id
     */
    @Schema(description = "题库模块id", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "题库模块id不能为空")
    private Long tikuTagsId;

    @Schema(description = "下发状态")
    private String issuedStatus;

    @Schema(description = "问卷问题类型：CHARACTER 人格;PERSONALITY 性格;COMMON 普通")
    private String questionType;

    @Schema(description = "问卷模板所选题库id集合 以逗号分割字符串")
    private String tikuIds;

    @Schema(description = "自定义题库题目集合")
    private List<Tiku> tikuList;

}
